﻿#ifndef BULLET_H
#define BULLET_Hr
#include <tank.h>
#include <windows.h>
#include <QPaintEvent>
#include <QPainter>
#include <vector>
#include <QDebug>
#include <map.h>
using namespace std;
struct Bullet {
    double x;
    double y;
    double angle;
    int time;
};

extern vector<Bullet> b1;
extern vector<Bullet> b2;
extern vector<date_map> maps;
extern bool is_up;

class tank;
class Map;
class Bullets:public QWidget
{
public:

    Bullets();
    Bullets(QWidget *parent);
    void Bullet_move();
    void Bullet_fire(tank &t1,tank &t2);
    void Bullet_to_wall(vector<Bullet> &b);
    bool Bullet_to_tank(vector<Bullet> &b,tank &t);
    void paintEvent(QPaintEvent *event);

};

#endif // BULLET_H
